<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>管理员登录-内容管理系统</title>

    <link href="/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/Public/assets/css/common.css">
    
</head>
<body>

<nav class="navbar navbar-default navbar-fixed-top col-md-10">
    <div class="container-fluid nav_bg">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?php echo U('File/home_page');?>">首页</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">系统设置<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="<?php echo U('System/info');?>">系统信息</a></li>
                            <li><a href="<?php echo U('System/change_password');?>">修改密码</a></li>
                            <li><a href="#">清除缓存</a></li>
                        </ul>
                    </li>
                    <li >
                        <a href="<?php echo U('Link/index');?>"  >友情链接</a>

                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">内容管理<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="<?php echo U('article/index');?>">文章列表</a></li>
                            <li><a href="<?php echo U('Category/index');?>">栏目管理</a></li>
                        </ul>
                    </li>
                </ul>
            </ul>


            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">尊敬的 <?php echo ($user["email"]); ?><span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>

                        <li role="separator" class="divider"></li>
                        <li><a href="<?php echo U('User/logout');?>">安全退出</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

<div class="container-fluid">
    
    <div class="row">
        <div class="col-md-12">

            <div class="row">
                <div class="col-md-8">
                    <div class="page-header">
                        <h1>内容管理</h1>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-10">
                    <div class="panel panel-default">
                        <div class="panel-heading">栏目管理</div>

                        <div class="panel-body">
                            <ul class="nav nav-tabs" role="tablist">
                                <li role="presentation" class="active"><a href="#home" role="tab"
                                                                          data-toggle="tab">栏目信息</a></li>
                                <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">栏目内容</a></li>
                            </ul>
                            <form class="form-horizontal" role="form" method="post" action="<?php echo U('store');?>">
                                <div class="tab-content">
                                    <div role="tabpanel" class="tab-pane active" id="home">
                                        <div class="form-group">
                                            <label for="parent" class="col-sm-2 control-label">父栏目</label>
                                            <div class="col-sm-10">
                                                <input type="text" list="url_list" name="text" id="parent" class="form-control"/>
                                                <datalist id="url_list">
                                                    <?php if(is_array($categories)): $i = 0; $__LIST__ = $categories;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$category): $mod = ($i % 2 );++$i;?><option label="" value="<?php echo ($category["name"]); ?>"/>
                                                        <?php if(is_array($category["children"])): $i = 0; $__LIST__ = $category["children"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$c): $mod = ($i % 2 );++$i;?><option label="" value="<?php echo ($c["name"]); ?>"/><?php endforeach; endif; else: echo "" ;endif; endforeach; endif; else: echo "" ;endif; ?>
                                                </datalist>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="name" class="col-sm-2 control-label">栏目</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" name="name" id="name"
                                                       placeholder="请输入栏目">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="pinyin" class="col-sm-2 control-label">pinyin</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" name="pinyin" id="pinyin"
                                                       placeholder="请输入拼音">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="type" class="col-sm-2 control-label">类别</label>
                                            <div class="col-sm-10">
                                                <div class="radio">
                                                    <label>
                                                        <input type="radio" name="type" id="type" value="1" checked>
                                                        列表
                                                    </label>
                                                </div>
                                                <div class="radio">
                                                    <label>
                                                        <input type="radio" name="type" id="type1" value="2">
                                                        封面
                                                    </label>
                                                </div>
                                                <div class="radio">
                                                    <label>
                                                        <input type="radio" name="type" id="type2" value="3">
                                                        url地址
                                                    </label>
                                                </div>

                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="url" class="col-sm-2 control-label">URL跳转地址</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" name="url" id="url"
                                                       placeholder="请输入URL">
                                            </div>
                                        </div>

                                    </div>
                                    <div role="tabpanel" class="tab-pane" id="profile">
                                    <textarea name="content">

                                    </textarea>
                                    </div>
                                    <div class="form-group">
                                        <label for="is_show" class="col-sm-2 control-label">是否显示</label>
                                        <div class="col-sm-10">
                                            <div class="radio">
                                                <label>
                                                    <input type="radio" name="is_show" id="is_show" value="1" checked>
                                                    是
                                                </label>
                                            </div>
                                            <div class="radio">
                                                <label>
                                                    <input type="radio" name="is_show" id="is_show1" value="0">
                                                    否
                                                </label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-offset-2 col-sm-10">
                                            <button type="button" class="btn btn-default">取消</button>
                                            <button type="submit" class="btn btn-default">保存</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <block name="js">

        <script src="/Public/ckeditor/ckeditor.js"></script>
        <script type="text/javascript" src="/Public/ckfinder/ckfinder.js"></script>

        <script>
            CKEDITOR.replace('content',
                    {
                        filebrowserBrowseUrl: '/Public/ckfinder/ckfinder.html',
                        filebrowserImageBrowseUrl: '/Public/ckfinder/ckfinder.html?type=Images',
                        filebrowserFlashBrowseUrl: '/Public/ckfinder/ckfinder.html?type=Flash',
                        filebrowserUploadUrl: '/Public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                        filebrowserImageUploadUrl: '/Public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                        filebrowserFlashUploadUrl: '/Public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
                    });
        </script>
    
</div>

<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="/Public/bootstrap/js/bootstrap.min.js"></script>


</body>
</html>